/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author XPF
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface SportsIndexTemplateRelation extends BasicModel<SportsIndexTemplateRelation> {
  configId?: string; // 关联模板
  indexId?: string; // 关联指标
  sort?: string; // 排序
}

export const sportsIndexTemplateRelationList = (params?: SportsIndexTemplateRelation | any) =>
  defHttp.get<SportsIndexTemplateRelation>({ url: adminPath + '/sports/sportsIndexTemplateRelation/list', params });

export const sportsIndexTemplateRelationListData = (params?: SportsIndexTemplateRelation | any) =>
  defHttp.post<Page<SportsIndexTemplateRelation>>({ url: adminPath + '/sports/sportsIndexTemplateRelation/listData', params });

export const sportsIndexTemplateRelationForm = (params?: SportsIndexTemplateRelation | any) =>
  defHttp.get<SportsIndexTemplateRelation>({ url: adminPath + '/sports/sportsIndexTemplateRelation/form', params });

export const sportsIndexTemplateRelationSave = (params?: any, data?: SportsIndexTemplateRelation | any) =>
  defHttp.postJson<SportsIndexTemplateRelation>({ url: adminPath + '/sports/sportsIndexTemplateRelation/save', params, data });

export const sportsIndexTemplateRelationDelete = (params?: SportsIndexTemplateRelation | any) =>
  defHttp.get<SportsIndexTemplateRelation>({ url: adminPath + '/sports/sportsIndexTemplateRelation/delete', params });
